<template>
  <view class="u-p-t-28 main-pd">
    <view class="u-card" v-if="dataList.length && !loading">
      <view class="list-item" v-for="item in dataList" :key="item.id" @click="$u.route('/pagesB/yzzz/yzdhDetail?id=' + item.id)">
        <view class="u-flex font-32 u-m-b-16">
          <view class="color-595959">大会标题：</view>
          <view class="color-333">{{ item.title }}</view>
        </view>
        <view class="u-flex font-32">
          <view class="color-595959">大会时间：</view>
          <view class="color-333">{{ item.createTime }}</view>
        </view>
      </view>
    </view>
    <view v-show="loading">
      <u-skeleton rows="5" title loading></u-skeleton>
    </view>
    <view class="empty-con">
      <u-empty mode="list" :show="!dataList.length && !loading"></u-empty>
    </view>
  </view>
</template>

<script setup>
import { ref } from "vue";
import { getyzdhListApi } from "@/api/index";
import { useList } from "@/hooks/useList";
import { onLoad } from "@dcloudio/uni-app";
const { loadData, dataList, page, loading } = useList({
  listApi: getyzdhListApi,
});
onLoad(() => {
  page.value = 1;
  dataList.value = [];
  loadData();
});
</script>

<style lang="scss" scoped></style>
